﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HotelManagement.Class;
using System.Collections;

namespace HotelManagement.UserManagementModule
{
    public partial class FilterByDutyType : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            UserAccount us=(UserAccount)Session["object"];
            Label3.Text = us.FirstName + " " + us.LastName;
        }

     
            protected void DropDownList1_SelectedIndexChanged1(object sender, EventArgs e)
        {
            if (DropDownList1.SelectedValue.Contains("Duty Type"))
            {
                Label1.Text = "Please Select One Option from drop-down list!";
                Label1.Visible = true;
                DataList1.Visible = false;
            }
            else
            {
                ArrayList list = HotelDBManager.getStaffDetailsByDutyType(DropDownList1.SelectedItem.Value); //selected from drop-down list
                DataList1.DataSource = list;
                DataList1.DataBind();
                DataList1.Visible = true;
            }
        }
    }
}